home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #14
/
Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO
/
math
/
maca_101.zip
/
DERIVE.DEM
< prev
next >
Wrap
Text File
|
1996-01-30
|
2KB
|
61 lines
;DERIVE.DEM
;DEMO FILE FOR MASSCALC VERSION 1.00
;WRITTEN BY: Ralph W. Reid
;This file may only be distributed in its unmodified form.
;
;DESCRIPTION: This file primarily demonstrates derivative calculations.
;
;For the latest releases of MASSCALC and other software created by
;Ralph W. Reid, see http://www2.athenon.com/~rreid/products/00-index.html.
;
;HOW TO USE THIS FILE: This file may be piped into MASSCALC, and its
;output displayed as follows:
;TYPE DERIVE.DEM | MASSCALC | MORE
;This file may be redirected into MASSCALC and its output displayed
;as follows:
;MASSCALC < DERIVE.DEM | MORE
;These two commands should be run from the operating system prompt.
;display the first and second derivative approximations of a ximple equation
;variables used in derivative calculations must be assigned a value first
x = 3;
print: "current _der_delta value is" _der_delta
print: "x and the approximate first and second derivatives of x^2:"
x;
derivative_1 (x, x^2);
derivative_2 (x, x^2);
print: "current _fund_der_delta value is" _fund_der_delta
print: "results for above equations using fundamental theorum of calculus"
print: "for the calculations:"
derivative (1, x, x^2);
derivative (2, x, x^2);
;change delta values and recalculate
_der_delta = _der_delta * 10;
print:
print: "_der_delta changed to" _der_delta
print: "now results are:"
derivative_1 (x, x^2);
derivative_2 (x, x^2);
_fund_der_delta = _fund_der_delta * 10;
print:
print: "_fund_der_delta changed to" _fund_der_delta
print: "fundamental derivative results are now:"
derivative (1, x, x^2);
derivative (2, x, x^2);
;find the derivatives of a list of values
create array: list [1, 5];
list = 1, 4, 9, 16, 25;
print:
print: "finding the derivatives of a list of values whose delta is 1.0:"
print: "initial list:" list
print: "first derivatives:"
derive_list (1, list);
print: "second derivatives:"
derive_list (1, derive_list (1, list));